/*
 * Copyright (c)  19-4-23 下午5:00   add by Lanvo
 */

package com.rf.richfitwheel.workflow.entity;

import java.util.HashMap;
import java.util.Map;

import com.rf.richfitwheel.admin.sys.vo.UserVO;

public class TaskParam {
    private String taskId; //当前任务ID
    private String busNo;//业务主键
    private String tenantId; //租户ID 2020-04-30
    private String discicription;//审批意见
    private String processKey;//流程主键
    private String userId;//提交审批人
    private String approveAdvice;//审批结果
    private String briefReport;//流程摘要,业务发起流程传入
    private boolean skipFirstNode = true;//当新发起流程时是否跳过第一个节点，默认跳过第一个节点，仅当taskId为空时有效
    public Map<String, Object> wf_param = new HashMap<>();//设置全局流程参数
	private Map<String, Object> variablesLocal = new HashMap<>();//设置节点流程参数
    private String authCatagory; // 1-代处理,从授权处理的流程点击进来的这个值为‘1’
    private String owner; // 授权人，从授权处理的流程点击进来的这个值为授权人
    private Map<String, Object> formProperties;//动态表单数据
    private UserVO user;
    private String insId;//流程实例id，一般不用传入，返回值中使用

    public TaskParam(Map<String, Object> param, UserVO user) {
        this.taskId = param.get("taskId") != null ? param.get("taskId").toString() : "";
        //this.busNo=param.get("busNo")!=null?param.get("busNo").toString():"";
        this.tenantId = param.get("tenantId") != null ? param.get("tenantId").toString() : ""; //增加租户ID参数 2020-04-30
        this.setDiscicription(param.get("discicription") != null ? param.get("discicription").toString() : "");
        this.processKey = param.get("processKey") != null ? param.get("processKey").toString() : "";
        this.userId = param.get("userId") != null ? param.get("userId").toString() : "";
        this.user = user;
    }

    public TaskParam() {
    }

    public UserVO getUser() {
        return user;
    }

    public void setUser(UserVO user) {
        this.user = user;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getBusNo() {
        return busNo;
    }

    public void setBusNo(String busNo) {
        this.busNo = busNo;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getDiscicription() {
		return discicription;
	}

	public void setDiscicription(String discicription) {
		this.discicription = discicription;
	}

	public String getApproveAdvice() {
        return approveAdvice;
    }

    public void setApproveAdvice(String approveAdvice) {
        this.approveAdvice = approveAdvice;
    }

    public String getProcessKey() {
        return processKey;
    }

    public void setProcessKey(String processKey) {
        this.processKey = processKey;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getBriefReport() {
        return briefReport;
    }

    public void setBriefReport(String briefReport) {
        this.briefReport = briefReport;
    }
    
    /**
     * @return skipFirstNode
     */
    public boolean isSkipFirstNode() {
        return skipFirstNode;
    }

    /**
     * @param skipFirstNode 要设置的 skipFirstNode
     */
    public void setSkipFirstNode(boolean skipFirstNode) {
        this.skipFirstNode = skipFirstNode;
    }
    
    public String getAuthCatagory() {
        return authCatagory;
    }
    
    public void setAuthCatagory(String authCatagory) {
        this.authCatagory = authCatagory;
    }
    
    public String getOwner() {
        return owner;
    }
    
    public void setOwner(String owner) {
        this.owner = owner;
    }
	
	public Map<String, Object> getVariablesLocal() {
		return variablesLocal;
	}
	
	public void setVariablesLocal(Map<String, Object> variablesLocal) {
		this.variablesLocal = variablesLocal;
	}
	
	public Map<String, Object> getFormProperties() {
		return formProperties;
	}

	public void setFormProperties(Map<String, Object> formProperties) {
		this.formProperties = formProperties;
	}

	/* （非 Javadoc）
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("TaskParam [taskId=");
		builder.append(taskId);
		builder.append(", busNo=");
		builder.append(busNo);
		builder.append(", tenantId=");
		builder.append(tenantId);
		builder.append(", approveAdvice=");
		builder.append(approveAdvice);
		builder.append(", processKey=");
		builder.append(processKey);
		builder.append(", userId=");
		builder.append(userId);
		builder.append(", discicription=");
		builder.append(discicription);
		builder.append(", briefReport=");
		builder.append(briefReport);
		builder.append(", skipFirstNode=");
		builder.append(skipFirstNode);
		builder.append(", wf_param=");
		builder.append(wf_param);
		builder.append(", variablesLocal=");
		builder.append(variablesLocal);
		builder.append(", authCatagory=");
		builder.append(authCatagory);
		builder.append(", owner=");
		builder.append(owner);
		builder.append(", formProperties=");
		builder.append(getFormProperties());
		builder.append(", user=");
		builder.append(user);
		builder.append("]");
		return builder.toString();
	}

	public String getInsId() {
		return insId;
	}

	public void setInsId(String insId) {
		this.insId = insId;
	}
	
}
